package com.yanbing.service;

import com.spring.BeanNameAware;
import com.spring.Component;
import com.spring.Scope;


/**
 * @author yanbing
 * @version 1.0
 * @date 2021/9/4 21:16
 */
@Component
@Scope()
public class UserServiceImpl  implements BeanNameAware {

    static int i=0;

    static{
        System.out.println("静态代码块...............");
    }
    {
        System.out.println("代码块..............");
    }

    public void test() {
        System.out.println("UserServiceImpl  test println  .....................");
    }

    @Override
    public void setBeanName(String name) {
        System.out.println("实现了BeanNameAware 接口 beanName:"+name);
    }
}
